package com.gitee.ywj1352.factory.factory;

import com.gitee.ywj1352.factory.model.Desk;
import com.gitee.ywj1352.factory.model.Furniture;

public class DeskFactory {

    private static volatile DeskFactory singinle;

    public static DeskFactory getFactory(){
        if (singinle != null){
            return singinle;
        }else {
            synchronized (DeskFactory.class){
                singinle = new DeskFactory();
                return singinle;
            }
        }
    }

    private DeskFactory(){}


    public Furniture getDesk(){
        return  new Desk();
    }

}
